import 'package:flutter/cupertino.dart';
import 'package:flutter_public/flutter_public.dart';

import '../support/theme_color.dart';

/// FileName activity_linear_gradient_container
///
/// @Author lax
/// @Date 2024/3/7
///
/// @Description

class ActivityBorderContainer extends Container {
  ActivityBorderContainer({
    super.key,
    EdgeInsets? margin,
    EdgeInsets? padding,
    double? radius = 8,
    bool highlight = false,
    Color? color,
    Widget? child,
  }) : super(
          margin: margin,
          padding: padding,
          decoration: highlight
              ? LinearGradientDecoration(
                  radius: radius,
                  colors: const [ThemeColor.activityPrimary, ThemeColor.activityLightPrimary],
                )
              : BorderDecoration(
                  borderWidth: 1,
                  borderColor: ThemeColor.activityBorder,
                  color: color ?? const Color(0x16ff0000),
                  radius: radius ?? 0),
          child: child,
        );
}
